<?php
namespace app\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
    'account'  =>  'require|length:4,16',
    'pwd' =>  'require|length:6',
    ];
    protected $message  =   [
        'account.require' => '账号名必填',
        'account.length'     => '账号名长度在4到16之间',
        'pwd.require' => '密码必填',
        'pwd.length'     => '密码长度为6',
    ];
    protected $scene = [
        'siginIn'  =>  ['account','pwd'],
        'register' =>  ['account','pwd']
    ];
}